<template>
  <div>
    <a-modal
      :title="title"
      :width="1000"
      :visible="visible"
      :confirmLoading="confirmLoading"
      @ok="handleOk"
      @cancel="handleCancel"
    >
      <a-descriptions bordered :column="{ md: 2, sm: 2 }">
        <a-descriptions-item label="物品名称" :span="2">
          {{ model.itemName }}
        </a-descriptions-item>
        <a-descriptions-item label="领用人" :span="1">
          {{ model.optUserName }}
        </a-descriptions-item>
        <a-descriptions-item label="工装编号" :span="1">
          {{ model.fixture_code }}
        </a-descriptions-item>
        <a-descriptions-item label="借记状态" :span="1">
          {{ model.isClosed ? '归还' : '借出' }}
        </a-descriptions-item>
        <a-descriptions-item label="创建时间" :span="1">
          {{ model.createTime }}
        </a-descriptions-item>
      </a-descriptions>
    </a-modal>
  </div>
</template>

<script>
// import { JeecgListMixin } from '@/mixins/JeecgListMixin'

export default {
  name: 'OutWareHouseGoodDetailModal',
  // mixins: [JeecgListMixin],
  data() {
    return {
      title: '详情',
      visible: false,
      model: {},
      layout: {
        labelCol: { span: 3 },
        wrapperCol: { span: 14 }
      },
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      },
      confirmLoading: false,
      form: this.$form.createForm(this),
      url: {
        // list: '/outWarehouseCtrl/getOutWarehouseItemDetail'
      }
    }
  },
  methods: {
    add(record) {
      console.log('子组件详情', record)
      this.model = Object.assign({}, record)
      this.visible = true
    },
    handleCancel() {
      this.visible = false
    },
    handleOk() {
      this.visible = false
    }
  }
}
</script>

<style scoped>
.form_model {
  display: flex;
  flex-wrap: wrap;
}
.ant-form-item {
  width: 50%;
}

.ant-modal {
  margin-top: 100px !important;
}

.ant-modal-content {
  margin-top: 100px !important;
}
</style>
